package com.example.lombok;

import lombok.Data;

import java.util.Date;

/**
 * @author shanchong
 * @date 2019-06-23
 **/
@Data
public class DataDemo {

    private String name;

    private Date createDate;

    private Integer age;

    /**
     * @Data：注解在类上，相当于同时使用了@ToString、@EqualsAndHashCode、@Getter、@Setter和@RequiredArgsConstrutor这些注解，对于POJO类十分有用
     * @param args
     */
    public static void main(String[] args) {
        DataDemo dataDemo = new DataDemo();
        dataDemo.setAge(1);
        dataDemo.setName("shanchong");
        dataDemo.setCreateDate(new Date());
        System.out.println(dataDemo);
    }
}
